<?php
/**
 *
 * @package avp
 * @version $Id: $
 * @copyright (c) 2006 Jan-Willem van Ganswijk, Stefan van Essen
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
 */
if (!defined('IN_SCRIPT')) {
    die();
}

function print_message($title, $message, $url, $small = false) {
    global $template, $lang;
    $template->set_title($title);

	$template->add_vars(array('message' => $message, 'url' => $url, 'linkmsg' => $lang['LINK_CONTINUE'] ));

    $template->add_var('message', $message);
    $template->add_var('url', $url);

    if ($small == true) {
        $template->add_templates('admin_header_small,admin_message,admin_footer');
    } else {
        $template->add_templates('admin_header,admin_message,admin_footer');
    }
    $template->make_page();
}

function print_error($message, $url, $small = false) {
    global $template, $lang;
    $template->set_title($lang['TITLE_ERROR']);

	$template->add_vars(array('message' => $message, 'url' => $url, 'linkmsg' => $lang['LINK_BACK'] ));
    if ($small == true) {
        $template->add_templates('admin_header_small,admin_message,admin_footer');
    } else {
        $template->add_templates('admin_header,admin_message,admin_footer');
    }
    $template->make_page();
}

function print_confirmbox($confirmurl, $backurl, $title = "") {
    global $template, $lang;
    $template->set_title($title);

    $template->add_var('confirmurl', $confirmurl);
    $template->add_var('backurl', $backurl);

    $template->add_templates('admin_header,admin_confirmbox,admin_footer');
    $template->make_page();
}

?>